home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / Aug 90 / MacApp.Tech$ 8⁄10⁄90 / 1706-hiding TGridView col-Aug90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  2.9 KB  |  92 lines  |  [TEXT/GEOL]

  1. Item    5189459                         7-Aug-90        06:09PDT
  2.  
  3. From:   SAVITAR                         Savitar, Rudy Burger,PRT
  4.  
  5. To:     MACAPP.TECH$                    MacApp Technical
  6.  
  7. Sub:    hiding TGridView columns
  8.  
  9. Attn: MacApp.Tech$
  10. SentBy: James Plamondon
  11. Date   8/7/90
  12. Subject    hiding TGridView columns
  13. From   James Plamondon
  14. To MacApp.Tech$
  15.  
  16. From MIKEAPPLELINK            hiding TGridView columns
  17. Item    4657685                         6-Aug-90        18:06PDT
  18.  
  19. From:   SAVITAR                         Savitar, Rudy Burger,PRT
  20.  
  21. To:     MACAPP.TECH$                    MacApp Technical
  22.  
  23. Sub:    hiding TGridView columns
  24.  
  25. Attn: MacApp.Tech$
  26. SentBy: James Plamondon
  27. Date   8/6/90
  28. Subject    hiding TGridView columns
  29. From   James Plamondon
  30. To MacApp.Tech$
  31.  
  32. From MIKEAPPLELINK            hiding TGridView columns
  33. Item    4190555                         6-Aug-90        13:58PDT
  34.  
  35. From:   POWERUP.ENG                     Power Up Software,PRT
  36.  
  37. To:     MACAPP.TECH$                    MacApp Technical
  38.  
  39. Sub:    hiding TGridView columns
  40.  
  41. Attn:   MacApp.Tech$
  42. SentBy: James Plamondon
  43. Date   8/6/90
  44. Subject    hiding TGridView columns
  45. From   James Plamondon
  46. To   MacApp.Tech$
  47.  
  48. Subject:   hiding TGridView columns
  49. Gentlepersons,
  50.  
  51. I need to be able to show and hide columns in a grid view.  When hidden
  52. columns are shown, they need to return to the width they had when previously
  53. shown.  An obvious way to do this is to negate the widths of hidden columns,
  54. so that a column of width 35, when hidden, would have a width of -35.  It
  55. would be necessary to use a width of zero instead of -35 in a number of places
  56. — specifically, for anything having to do with drawing.
  57.  
  58. The widths of columns in a grid view are maintained in a TRunArray, referenced
  59. by TGridView.fColWidths.  I'm thinking about subclassing TRunArray to provide
  60. the functionality I need.  I would need to override the following TRunArray
  61. routines:
  62.     GetValue():  to return zero instead of the actual negative value
  63.     SumValues():  to only add positive values
  64.     FindChunk():  it looks complicated, it's called by SumValues(), so I'll
  65. probably have to change it, too.
  66.  
  67. I'll also have to free the TRunArray allocated and assigned to fColWidths in
  68. the initialization of the TGridView, and create a new one of the new type in
  69. its place.
  70.  
  71. So, my question for the gang is:  Does anybody see any reason why this will
  72. scheme will not work?  Perhaps someone has got such a mechanism working
  73. already — if so, I'd love to share your code, or trade you for some of my
  74. stuff.
  75.  
  76. Looking forward to implementing this feature without having to work too hard,
  77. I remain
  78.  
  79. Yours,
  80.  
  81. James Plamondon
  82.  
  83. P.S.:    This would be more convenient if fColWidths' TRunArray were created
  84. by a CreateColWidths() method, which it is not.  Perhaps that is true of all
  85. owned objects:  that they should be created by Create<FieldName> routines, so
  86. that the class of the created object can be easily overridden.
  87.  
  88. jp
  89.  
  90.  
  91.  
  92.